<?php
/**
 * 查询订单
 */
if (!defined('IN_CRONLITE')) die();
?>
<!DOCTYPE html>
<html lang="zh"
      style="font-size: 102.4px;<?= background::image() == false ? 'background:linear-gradient(to left, #70e1f5, #ffd194);' : background::image() ?>">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover,user-scalable=no">
    <script> document.documentElement.style.fontSize = document.documentElement.clientWidth / 750 * 40 + "px";</script>
    <meta name="format-detection" content="telephone=no">
    <meta name="csrf-param" content="_csrf">
    <meta name="csrf-token"
          content="201LTF3q2tij2vn-BETmAv-IWRi93YNTLfQ2YubgZ1WzfQIfAoGDrpWJvLVlEZBgl_JrQtix6RJnnmAsiNczHQ==">
    <meta name="viewport" content="width=device-width, viewport-fit=cover">
    <title><?= $conf['sitename'] . ($conf['title'] == '' ? '' : ' - ' . $conf['title']) ?></title>
    <meta name="keywords" content="<?= $conf['keywords'] ?>">
    <meta name="description" content="<?= $conf['description'] ?>">

    <link rel="stylesheet" type="text/css" href="<?php echo $cdnserver; ?>assets/layui/css/layui.css"/>
    <link rel="stylesheet" type="text/css" href="<?php echo $cdnserver; ?>assets/cool/css/foxui.css">
    <link rel="stylesheet" type="text/css" href="<?php echo $cdnserver; ?>assets/cool/css/style.css">
    <link rel="stylesheet" type="text/css" href="<?php echo $cdnserver; ?>assets/cool/css/foxui.diy.css">
    <link rel="shortcut icon" href="<?php echo $cdnserver; ?>assets/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" type="text/css" href="<?php echo $cdnserver; ?>assets/cool/css/iconfont.css">

    <link href="<?php echo $cdnpublic ?>font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
    <script src="<?php echo $cdnpublic ?>modernizr/2.8.3/modernizr.min.js"></script>
    <link rel="stylesheet" type="text/css" href="<?php echo $cdnserver; ?>assets/layui/css/layui.css"/>
</head>
<script>
    window.alert = function (name) {
        const iframe = document.createElement('IFRAME');
        iframe.style.display = 'none';
        iframe.setAttribute('src', 'data:text/plain,');
        document.documentElement.appendChild(iframe);
        window.frames[0].window.alert(name);
        iframe.parentNode.removeChild(iframe);
    };
</script>
<style>
    .fix-iphonex-bottom {
        padding-bottom: 34px;
    }

    body {
        width: 100%;
        max-width: 648px;
        margin: auto;
    }

    .fui-tab.fui-tab-primary a.active {
        color: #1492fb;
        border-color: #1492fb;
    }

    .qt-header {
        display: none;
        height: 8vh;
        line-height: 8vh;
        background-color: #f2f2f2;
    }

    .qt-header > input {
        height: 5vh;
        width: 100%;
        border: none;
        text-indent: 2.5em;
        line-height: 5vh;
        border-radius: 0.5em;
        font-size: 0.7rem;
    }

    .qt-header > span {
        position: absolute;
        margin-left: 0.6rem;
        font-size: 0.7rem;
    }

    .qt-card {
        box-shadow: 0px 0px 6px #eee;
        border-radius: 0.5em;
    }

    .qt-card img {
        width: 6em;
        max-width: 100%;
        height: 6em;
        border-radius: 0.5em;
        box-shadow: 3px 3px 16px #eee;
    }

    .qt-btn {
        border-radius: 0.5em;
        border: solid 1px #eee;
    }

</style>

<body>
<div id="body" style="width: 100%;max-width: 648px">
    <div class="fui-page-group statusbar" style="max-width: 650px;left: auto;overflow: hidden;">
        <div class="layui-row layui-col-space6">
            <div class="layui-card">
                <div class="layui-card-header"
                     style="text-align: center;font-size: 0.9rem;box-shadow: 3px 3px 16px #eee;color: #333;margin-bottom: 0.5rem;">
                    订单管理
                    <a href="javascript:hiset()"
                       class="layui-icon layui-icon-search" id="sicon" style="position:absolute;left: 1rem"></a>
                </div>
                <div class="layui-card-header qt-header" >
                    <span class="layui-icon layui-icon-search"
                          onclick="OrderManagement.OrderQuery('OrderAll',$('#query').val())"></span>
                    <input type="text" id="query"
                           onkeydown="if(event.keyCode==13){OrderManagement.OrderQuery('OrderAll',$('#query').val())}"
                           placeholder="搜索我的订单" autocomplete="off">
                </div>
                <div class="layui-card-body" style="padding: 0;background-color: white">
                    <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                        <ul class="layui-tab-title" style="text-align: center">
                            <li class="layui-this">已提交订单</li>
                            <li>待提交订单</li>
                            <li>订单查询</li>
                            <li onclick="location.href = './?mod=extract';">卡密提取</li>
                        </ul>
                        <div class="layui-tab-content"
                             style="padding: 1em;padding-bottom: 3em;overflow:hidden;overflow-y: auto;height: 80vh">
                            <?php if ($conf['notice_check'] != '') { ?>
                                <div style="width: 100%;min-height: 3em;padding: 1em;box-shadow: 0px 0px 16px #eee;border-radius: 0.5em;margin-bottom: 1em;">
                                    <?= $conf['notice_check'] ?>
                                </div>
                            <?php } ?>
                            <div class="layui-tab-item layui-show" id="order_all"></div>
                            <div class="layui-tab-item" id="order_a"></div>
                            <div class="layui-tab-item">
                                <div class="layui-card">
                                    <div class="layui-card-body">

                                        <div class="layui-form layui-form-pane">
                                            <div class="layui-form-item">
                                                <label class="layui-form-label">下单信息</label>
                                                <div class="layui-input-block">
                                                    <input type="text" id="vae"
                                                           onkeydown="if(event.keyCode==13){merchandise.query_sep($('#vae').val())}"
                                                           required lay-verify="required" placeholder="请填写下单信息！"
                                                           autocomplete="off"
                                                           class="layui-input">
                                                </div>
                                            </div>
                                            <button class="layui-btn layui-btn layui-btn-normal layui-btn-fluid layui-btn-radius layui-btn-sm"
                                                    style="background-color: white;color: #666;border: 1px solid #000"
                                                    id="submit_query">
                                                查询未绑定用户的订单
                                            </button>
                                            <div id="content_query"></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <?php if ($conf['notice_bottom'] != '') { ?>
                                <div style="width: 100%;min-height: 3em;padding: 1em;box-shadow: 0px 0px 16px #eee;margin-top: 1em;border-radius: 0.5em;margin-bottom: 1em;">
                                    <?= $conf['notice_bottom'] ?>
                                </div>
                            <?php } ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <style>
            .fui-navbar .label {
                margin-top: 0.3em;
            }
        </style>
        <div class="fui-navbar" style="max-width: 650px;padding-top: 0.1em">
            <a href="index.php" class="nav-item  "> <span class="icon icon-home"></span> <span class="label">首页</span>
            </a>
            <a href="/?mod=query" class="nav-item "> <span class="icon icon-dingdan1"></span> <span
                        class="label">订单</span> </a>
            <a href="/?mod=cart" class="nav-item "> <span class="icon icon-cart2"></span> <span
                        class="label">购物车</span> </a>
            <a href="/user/" class="nav-item "> <span class="icon icon-person2"></span> <span
                        class="label">会员中心</span> </a>
        </div>

    </div>
</div>
<script src="<?php echo $cdnpublic ?>jquery/1.12.4/jquery.min.js"></script>
<script src="<?php echo $cdnpublic ?>jquery.lazyload/1.9.1/jquery.lazyload.min.js"></script>
<script src="<?php echo $cdnpublic ?>twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="<?php echo $cdnpublic ?>jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script src="<?php echo $cdnpublic ?>layer/2.3/layer.js"></script>
<script src="<?= $cdnpublic ?>jquery/3.4.1/jquery.min.js"></script>
<script src="<?php echo $cdnserver; ?>assets/layui/layui.all.js"></script>
<script src="<?php echo $cdnserver; ?>assets/js/main.js?var=<?= $accredit['versions'] ?>"></script>
<script>logo = "<?=$conf['logo']?>"</script>
<script src="/template/cool/template.js?var=<?= $accredit['versions'] ?>"></script>
<script>
    function hiset() {
        var display = $('.qt-header').css('display');
        if (display == 'none') {
            $('.qt-header').show(200);
            $("#sicon").attr('class','layui-icon layui-icon-up');
        } else{
            $('.qt-header').hide(200);
            $("#sicon").attr('class','layui-icon layui-icon-search');
        }
    }

    OrderManagement.OrderQuery('OrderAll'); // 进入页面查询全部订单
</script>
</body>
</html>